package com.lifeng.patterns.templatemethod;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by lifeng on 2019/10/16.
 */
public class MyClient {
    public static void main(String[] args) throws Exception {
        //请求支付宝
        AliPayReromeCall aliPayReromeCall = new AliPayReromeCall();
        Map<String,Object> payReqMap = new HashMap<String,Object>();
        payReqMap.put("merid","4543345454");
        payReqMap.put("orderno","20191012112312345");
        payReqMap.put("amt",1L);
        payReqMap.put("body","iphone11");
        Map<String,Object> resMap = aliPayReromeCall.execute(payReqMap);
        System.out.println("支付宝返回:"+resMap);

        //请求微信
        WechatPayReromeCall wechatPayReromeCall = new WechatPayReromeCall();
        Map<String,Object> wresMap = wechatPayReromeCall.execute(payReqMap);
        System.out.println("微信返回:"+resMap);
    }
}
